package com.baiyue.admin.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;

import com.baiyue.admin.entity.AdminInfo;
import com.baiyue.admin.manage.AdminInfoManage;
import com.baiyue.admin.manage.BookInfoManage;
import com.baiyue.admin.manage.FeedbackInfoManage;
import com.baiyue.admin.manage.OrderInfoManage;
import com.baiyue.admin.manage.OrderItemManage;
import com.baiyue.admin.manage.ReviewInfoManage;
import com.baiyue.admin.manage.ShoppingCartInfoManage;
import com.baiyue.admin.manage.ShoppingCartItemManage;
import com.baiyue.admin.manage.UserAddressManage;
import com.baiyue.admin.manage.UserInfoManage;
import com.baiyue.admin.manage.UserLoginManage;
import com.baiyue.admin.manage.WebParameterManage;


@Controller
public class TestControler {
	@Autowired
	private AdminInfoManage adminInfoManage;
	@Autowired
	private BookInfoManage  bookInfoManage;
	@Autowired
	private FeedbackInfoManage feedbackInfoManage;
	@Autowired
	private OrderInfoManage orderInfoManage;
	@Autowired
	private OrderItemManage orderItemManage;
	@Autowired
	private ReviewInfoManage reviewInfoManage;
	@Autowired
	private ShoppingCartInfoManage shoppingCartInfoManage;
	@Autowired
	private ShoppingCartItemManage shoppingCartItemManage;
	@Autowired
	private UserAddressManage	userAddressManage;
	@Autowired
	private UserInfoManage	userInfoManage;
	@Autowired
	private UserLoginManage userLoginManage;
	@Autowired
	private WebParameterManage webParameterManage;
	
	@RequestMapping("testAdminInfo.do")
	public ModelAndView testAdminInfo(HttpServletRequest request,HttpServletResponse response){
		ModelAndView mv = new ModelAndView();
		System.out.println("****************adminInfo*************");
		AdminInfo adminInfo = adminInfoManage.selectById("123456789012");
		
		System.out.println("****************bookInfo****************");
		bookInfoManage.selectById("123456789012");
		
		System.out.println("***************feedbackInfo**************");
		feedbackInfoManage.selectById("123456789012");
		
		System.out.println("*****************orderInfo******************");
		orderInfoManage.selectById("123456789012");
		
		System.out.println("*****************orderItem*******************");
		orderItemManage.selectById("123456789012");
		
		System.out.println("******************reviewInfo******************");
		reviewInfoManage.selectById("123456789012");
		
		System.out.println("***************shoppingCartInfo****************");
		shoppingCartInfoManage.selectById("123456789012");
		
		System.out.println("***************shoppingCartItem******************");
		shoppingCartItemManage.selectById("123456789012");
		
		System.out.println("*****************useraddress**********************");
		userAddressManage.selectById("123456789012");
		
		System.out.println("******************userinfo**************************");
		userInfoManage.selectById("123456789012");
		
		System.out.println("*******************userlogin**************************");
		userLoginManage.selectById("123456789012");
		
		System.out.println("*******************webparameter************************");
		webParameterManage.selectById("123456789012");

		request.setAttribute("adminInfo", adminInfo);
		return new ModelAndView("testPage");
	}

	
	public AdminInfoManage getAdminInfoManage() {
		return adminInfoManage;
	}

	public void setAdminInfoManage(AdminInfoManage adminInfoManage) {
		this.adminInfoManage = adminInfoManage;
	}

	public BookInfoManage getBookInfoManage() {
		return bookInfoManage;
	}

	public void setBookInfoManage(BookInfoManage bookInfoManage) {
		this.bookInfoManage = bookInfoManage;
	}

	public FeedbackInfoManage getFeedbackInfoManage() {
		return feedbackInfoManage;
	}

	public void setFeedbackInfoManage(FeedbackInfoManage feedbackInfoManage) {
		this.feedbackInfoManage = feedbackInfoManage;
	}

	public OrderInfoManage getOrderInfoManage() {
		return orderInfoManage;
	}

	public void setOrderInfoManage(OrderInfoManage orderInfoManage) {
		this.orderInfoManage = orderInfoManage;
	}

	public OrderItemManage getOrderItemManage() {
		return orderItemManage;
	}

	public void setOrderItemManage(OrderItemManage orderItemManage) {
		this.orderItemManage = orderItemManage;
	}

	public ReviewInfoManage getReviewInfoManage() {
		return reviewInfoManage;
	}

	public void setReviewInfoManage(ReviewInfoManage reviewInfoManage) {
		this.reviewInfoManage = reviewInfoManage;
	}

	public ShoppingCartInfoManage getShoppingCartInfoManage() {
		return shoppingCartInfoManage;
	}

	public void setShoppingCartInfoManage(
			ShoppingCartInfoManage shoppingCartInfoManage) {
		this.shoppingCartInfoManage = shoppingCartInfoManage;
	}

	public ShoppingCartItemManage getShoppingCartItemManage() {
		return shoppingCartItemManage;
	}

	public void setShoppingCartItemManage(
			ShoppingCartItemManage shoppingCartItemManage) {
		this.shoppingCartItemManage = shoppingCartItemManage;
	}

	public UserAddressManage getUserAddressManage() {
		return userAddressManage;
	}

	public void setUserAddressManage(UserAddressManage userAddressManage) {
		this.userAddressManage = userAddressManage;
	}

	public UserInfoManage getUserInfoManage() {
		return userInfoManage;
	}

	public void setUserInfoManage(UserInfoManage userInfoManage) {
		this.userInfoManage = userInfoManage;
	}

	public UserLoginManage getUserLoginManage() {
		return userLoginManage;
	}

	public void setUserLoginManage(UserLoginManage userLoginManage) {
		this.userLoginManage = userLoginManage;
	}

	public WebParameterManage getWebParameterManage() {
		return webParameterManage;
	}

	public void setWebParameterManage(WebParameterManage webParameterManage) {
		this.webParameterManage = webParameterManage;
	}
}
